package test;

import java.util.ArrayList;
import java.util.Iterator;

import javax.lang.model.element.NestingKind;

import news.News;
import news.Newsdao;
import user.dao;

public class Newsdao_dome {
	public static void main(String[] args) {
		
		/*news.setTitle("1");
		news.setContent("222");
		news.setUid(40);
		Newsdao newsdao = new Newsdao();
		int result = newsdao.doNewsAdd(news);
		System.out.println(result);*/
		Newsdao newsdao = new Newsdao();
		ArrayList<News> list = newsdao.doNewsPage(2, 5);
	    Iterator<News> iterator = list.iterator();
	    while (iterator.hasNext()){//遍历显示}
				News news = iterator.next();
				System.out.println(news.getPubtime());
	    }
	}
}
